import { IConfig } from "./IConfig";

export abstract class ACategory{
    protected configDic:Map<any,IConfig>=new Map<any,IConfig>(); 
    public async init(){

    }
    public get(id:any):IConfig{
        return this.configDic.get(id.toString());
    }
    public getOne():IConfig{
        let config:IConfig;
        for (const iterator of this.configDic) {
            config=iterator[1];
            break;
        }
        return config;
    }
    public getAll(){
        return Array.from(this.configDic.values());
    }
}